cmake_minimum_required(VERSION 3.14)

project(ui-analyzer LANGUAGES CXX VERSION 0.0.1)

include(cmake/SparkWithGit.cmake)
spark_initialize_modules()

spark_add_links_qt(Xml)

spark_add_library_realpaths(
    src/utils
)
target_link_qt_xml(utils)

include(examples/dev.cmake)


# 资源文件路径
set(QRC_SOURCES "")

spark_add_executable_path(${PROJECT_NAME} 
    src
    src/utils
    ${QRC_SOURCES}
)
target_link_qt5(${PROJECT_NAME})
target_link_utils(${PROJECT_NAME})

spark_framework_include_with_git(${PROJECT_NAME} 
    https://gitee.com/spark-framework-libs/spark-framework-features
    FEATURES version screenutil)

# other/ztbox 单独提供一个外部插件模块
spark_add_library_path(ui-analyzer-plugin SHARED 
    other/ztbox 
    src/ui/widgets
)
target_link_utils(ui-analyzer-plugin)

spark_framework_include_with_git(ui-analyzer-plugin
    https://gitee.com/zinface/z-tools-toolbox
    FEATURES plugin
)

# 测试示例
add_subdirectory(tests)
